import request from '@/utils/request'

// 获取员工列表
export function getEmployeeList(data: any) {
  return request({
    url: '/employee/list',
    method: 'post',
    data
  })
}

// 添加员工
export function addEmployee(data: any) {
  return request({
    url: '/employee/addEmployee',
    method: 'post',
    data
  })
}

// 更新员工
export function updateEmployee(data: any) {
  return request({
    url: '/employee/updateEmployee',
    method: 'put',
    data
  })
}

// 重置密码
export function resetPassword(jobNumber: number) {
  return request({
    url: `/employee/reset-password/${jobNumber}`,
    method: 'post'
  })
}

// 修改状态
export function changeStatus(jobNumber: number, status: number) {
  return request({
    url: `/employee/status/${jobNumber}/${status}`,
    method: 'post'
  })
}